//******************************************************************
//  Cognex UK - 11-13-2019                                         *
//  Version: 1.0                                                   *
//  Author: GN                                                     *
//  Description:    Custom block to convert variables              *
//******************************************************************

#ArrayLength := 99;

// Copy variables from Input Byte to an Array of Bytes
// 
#ByteArray[0] := "Inspection Results 32";
#ByteArray[1] := "Inspection Results 33";
#ByteArray[2] := "Inspection Results 34";
#ByteArray[3] := "Inspection Results 35";
#ByteArray[4] := "Inspection Results 36";
#ByteArray[5] := "Inspection Results 37";
#ByteArray[6] := "Inspection Results 38";
#ByteArray[7] := "Inspection Results 39";
#ByteArray[8] := "Inspection Results 40";
#ByteArray[9] := "Inspection Results 41";
#ByteArray[10] := "Inspection Results 42";
#ByteArray[11] := "Inspection Results 43";
#ByteArray[12] := "Inspection Results 44";
#ByteArray[13] := "Inspection Results 45";
#ByteArray[14] := "Inspection Results 46";
#ByteArray[15] := "Inspection Results 47";
#ByteArray[16] := "Inspection Results 48";
#ByteArray[17] := "Inspection Results 49";
#ByteArray[18] := "Inspection Results 50";
#ByteArray[19] := "Inspection Results 51";
#ByteArray[20] := "Inspection Results 52";
#ByteArray[21] := "Inspection Results 53";
#ByteArray[22] := "Inspection Results 54";
#ByteArray[23] := "Inspection Results 55";
#ByteArray[24] := "Inspection Results 56";
#ByteArray[25] := "Inspection Results 57";
#ByteArray[26] := "Inspection Results 58";
#ByteArray[27] := "Inspection Results 59";
#ByteArray[28] := "Inspection Results 60";
#ByteArray[29] := "Inspection Results 61";
#ByteArray[30] := "Inspection Results 62";
#ByteArray[31] := "Inspection Results 63";
#ByteArray[32] := "Inspection Results 64";
#ByteArray[33] := "Inspection Results 65";
#ByteArray[34] := "Inspection Results 66";
#ByteArray[35] := "Inspection Results 67";
#ByteArray[36] := "Inspection Results 68";
#ByteArray[37] := "Inspection Results 69";
#ByteArray[38] := "Inspection Results 70";
#ByteArray[39] := "Inspection Results 71";
#ByteArray[40] := "Inspection Results 72";
#ByteArray[41] := "Inspection Results 73";
#ByteArray[42] := "Inspection Results 74";
#ByteArray[43] := "Inspection Results 75";
#ByteArray[44] := "Inspection Results 76";
#ByteArray[45] := "Inspection Results 77";
#ByteArray[46] := "Inspection Results 78";
#ByteArray[47] := "Inspection Results 79";
#ByteArray[48] := "Inspection Results 80";
#ByteArray[49] := "Inspection Results 81";
#ByteArray[50] := "Inspection Results 82";
#ByteArray[51] := "Inspection Results 83";
#ByteArray[52] := "Inspection Results 84";
#ByteArray[53] := "Inspection Results 85";
#ByteArray[54] := "Inspection Results 86";
#ByteArray[55] := "Inspection Results 87";
#ByteArray[56] := "Inspection Results 88";
#ByteArray[57] := "Inspection Results 89";
#ByteArray[58] := "Inspection Results 90";
#ByteArray[59] := "Inspection Results 91";
#ByteArray[60] := "Inspection Results 92";
#ByteArray[61] := "Inspection Results 93";
#ByteArray[62] := "Inspection Results 94";
#ByteArray[63] := "Inspection Results 95";
#ByteArray[64] := "Inspection Results 96";
#ByteArray[65] := "Inspection Results 97";
#ByteArray[66] := "Inspection Results 98";
#ByteArray[67] := "Inspection Results 99";
#ByteArray[68] := "Inspection Results 100";
#ByteArray[69] := "Inspection Results 101";
#ByteArray[70] := "Inspection Results 102";
#ByteArray[71] := "Inspection Results 103";
#ByteArray[72] := "Inspection Results 104";
#ByteArray[73] := "Inspection Results 105";
#ByteArray[74] := "Inspection Results 106";
#ByteArray[75] := "Inspection Results 107";
#ByteArray[76] := "Inspection Results 108";
#ByteArray[77] := "Inspection Results 109";
#ByteArray[78] := "Inspection Results 110";
#ByteArray[79] := "Inspection Results 111";
#ByteArray[80] := "Inspection Results 112";
#ByteArray[81] := "Inspection Results 113";
#ByteArray[82] := "Inspection Results 114";
#ByteArray[83] := "Inspection Results 115";
#ByteArray[84] := "Inspection Results 116";
#ByteArray[85] := "Inspection Results 117";
#ByteArray[86] := "Inspection Results 118";
#ByteArray[87] := "Inspection Results 119";
#ByteArray[88] := "Inspection Results 120";
#ByteArray[89] := "Inspection Results 121";
#ByteArray[90] := "Inspection Results 122";
#ByteArray[91] := "Inspection Results 123";
#ByteArray[92] := "Inspection Results 124";
#ByteArray[93] := "Inspection Results 125";
#ByteArray[94] := "Inspection Results 126";
#ByteArray[95] := "Inspection Results 127";
#ByteArray[96] := "Inspection Results 128";
#ByteArray[97] := "Inspection Results 129";
#ByteArray[98] := "Inspection Results 130";
#ByteArray[99] := "Inspection Results 131";

// FOR loop to cycle through Byte TO Char conversion 

FOR #Index := 0 TO #ArrayLength DO
    #CharArray[#Index] := BYTE_TO_CHAR(#ByteArray[#Index]);
END_FOR;